package teste;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

@Aspect
public class MyAdvice {

	@Around("execution(* teste.IModel.*(..))")
	public Object invoke(ProceedingJoinPoint joinPoint) throws Throwable {
		System.out.println("Before calling " + joinPoint.getSignature().toLongString());
		System.out.println( joinPoint.getTarget() );
		/*
		JdkDynamicAopProxy proxy = (JdkDynamicAopProxy) joinPoint.getTarget();
		System.out.println(proxy.getTargetSource().getTarget());
		
		System.out.println( joinPoint.getKind() );
		System.out.println( joinPoint.getSignature() );
		System.out.println( proxy );
		*/
		Object returned = null;
		
		return returned;
	}
}